<template>
  <div class="cesium">
    <div id="cesiumMap"></div>
  </div>
</template>
<script>
import 'cesium/Widgets/widgets.css';
let Cesium = require('cesium/Cesium');


export default {
  name: "CesiumMap",
  data: {

  },
  setup() { },
  methods: {},
  mounted() {
    // createCesium("cesiumMap");

    // setTimeout(function () {
    //   flyTo();

    // }, 1000);


    // setTimeout(function () {
    //   setView();
    // }, 3000);


    let imageryProvider = new Cesium.WebMapTileServiceImageryProvider({
      url: 'http://t0.tianditu.com/img_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=img&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=189b1925501a5ece0893939e50df0304',
      layer: 'img',
      style: 'default',
      format: 'tiles',
      tileMatrixSetID: 'w',
      credit: new Cesium.Credit('天地图全球影像服务'),
      maximumLevel: 7,
      show: true,
    });

    let viewer = new Cesium.Viewer("cesiumMap", {
      // terrain: Cesium.Terrain.fromWorldTerrain(),
      animation: false,
      fullscreenButton: true,
      geocoder: false,
      homeButton: false,
      infoBox: false,
      sceneModePicker: false,
      selectionIndicator: false,
      timeline: false,
      navigationHelpButton: false,
      baseLayerPicker: false,
      navigationInstructionsInitiallyVisible: false,
      // imageryProvider: imageryProvider,
    });


  },
};
</script>
<style scoped lang="scss">
.cesium {
  width: 100%;
  height: 100%;
}
</style>
